package com.HuiShou.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.HuiShou.mapper.PointsMallGoodsMapper;
import com.HuiShou.domain.PointsMallGoods;
import com.HuiShou.service.IPointsMallGoodsService;

/**
 * 积分商品Service业务层处理
 * 
 * @author lyz
 * @date 2025-03-21
 */
@Service
public class PointsMallGoodsServiceImpl implements IPointsMallGoodsService 
{
    @Autowired
    private PointsMallGoodsMapper pointsMallGoodsMapper;

    /**
     * 查询积分商品
     * 
     * @param goodsId 积分商品主键
     * @return 积分商品
     */
    @Override
    public PointsMallGoods selectPointsMallGoodsByGoodsId(String goodsId)
    {
        return pointsMallGoodsMapper.selectPointsMallGoodsByGoodsId(goodsId);
    }

    /**
     * 查询积分商品列表
     * 
     * @param pointsMallGoods 积分商品
     * @return 积分商品
     */
    @Override
    public List<PointsMallGoods> selectPointsMallGoodsList(PointsMallGoods pointsMallGoods)
    {
        return pointsMallGoodsMapper.selectPointsMallGoodsList(pointsMallGoods);
    }

    /**
     * 新增积分商品
     * 
     * @param pointsMallGoods 积分商品
     * @return 结果
     */
    @Override
    public int insertPointsMallGoods(PointsMallGoods pointsMallGoods)
    {
        return pointsMallGoodsMapper.insertPointsMallGoods(pointsMallGoods);
    }

    /**
     * 修改积分商品
     * 
     * @param pointsMallGoods 积分商品
     * @return 结果
     */
    @Override
    public int updatePointsMallGoods(PointsMallGoods pointsMallGoods)
    {
        return pointsMallGoodsMapper.updatePointsMallGoods(pointsMallGoods);
    }

    /**
     * 批量删除积分商品
     * 
     * @param goodsIds 需要删除的积分商品主键
     * @return 结果
     */
    @Override
    public int deletePointsMallGoodsByGoodsIds(String[] goodsIds)
    {
        return pointsMallGoodsMapper.deletePointsMallGoodsByGoodsIds(goodsIds);
    }

    /**
     * 删除积分商品信息
     * 
     * @param goodsId 积分商品主键
     * @return 结果
     */
    @Override
    public int deletePointsMallGoodsByGoodsId(String goodsId)
    {
        return pointsMallGoodsMapper.deletePointsMallGoodsByGoodsId(goodsId);
    }
}
